<ui:composition template="/WEB-INF/templates/main-template.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<ui:define name="sidebar">
	<ui:include src="/WEB-INF/templates/public-sidebar.xhtml" />
	</ui:define>
	<ui:define name="content">
	
	   <!--  <h:panelGroup style="width:100%;text-align:center;">
		 <h:outputText value="Domestic Project Assignment Form" styleClass="outputTextTitle" />
		</h:panelGroup>-->
		<h:form id="DomesticProjectAssignmentForm">
		
		<p:growl id="growl"></p:growl>
		
		<h:panelGrid columns="3"  columnClasses="gridCellMiddleLeftAligned, gridCellMiddleRightAligned">
				
			<h:outputLabel value="Select" />
			<h:outputLabel value=":" />		
			<p:menuButton value="#{domesticProjectAssignmentFormBean.selectedButton}">	
			   	
				<p:menuitem value="Create Project Assignment" actionListener="#{domesticProjectAssignmentFormBean.buttonChangeListner}" update="@form"></p:menuitem>
				
				<p:menuitem value="View/Update Assignment" actionListener="#{domesticProjectAssignmentFormBean.buttonChangeListner}" update="@form"></p:menuitem>
			</p:menuButton>
		</h:panelGrid>
	   
		<!-- CREATE DOMESTIC PROJECT ASSIGNMENT FORM -->
         <h:panelGrid  rendered="#{domesticProjectAssignmentFormBean.createDomesticProjectAssignmentForm}" style="width: 100%;">
         <h:outputText value="#{msg['createprojectassinmentdomestic.lable.heading']}" styleClass="outputTextTitle" style="font-weight: bold; color: #7892B7"/>
		<p:spacer />
		<p:panel header="#{msg['employeedetails.label']}"  style="border: 1px solid #d9d9d9; width:95%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1" 
					 style="border: 1px solid #d9d9d9; background-color: #FFE4C4;  border: 1px solid #F5AD66; width:100%" cellspacing="3">
		
		<h:outputLabel value="#{msg['projectassignmentid.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText  value="#{domesticProjectAssignmentFormBean.projectAssignmentCode}"  readonly="true"/>
		<h:inputHidden  />
		<h:outputLabel value="#{msg['createdate.label']}" />
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" value="#{domesticProjectAssignmentFormBean.createDate}"  showButtonPanel="true"/>
		 	
		
		<h:outputLabel value="#{msg['employeeid.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{domesticProjectAssignmentFormBean.employeeId}"  readonly="true"/> 
		<h:inputHidden  />
		<h:outputLabel value="#{msg['employeename.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{domesticProjectAssignmentFormBean.employee.firstName} #{domesticProjectAssignmentFormBean.employee.lastName} "  readonly="true"/>
	
		<h:outputLabel value="#{msg['contactnumber.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{domesticProjectAssignmentFormBean.contactNumber}" readonly="true" />
		<h:inputHidden  />
		<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputMask value="#{domesticProjectAssignmentFormBean.projectAssignment.emergencycontactNumber}" mask="(999) 999-9999"/>
		 
		<h:outputLabel value="#{msg['approvedby.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText value="#{domesticProjectAssignmentFormBean.approvedBy}" readonly="true"/> 
		
		</h:panelGrid>
	</p:panel>
		<p:panel header="#{msg['assignmentdetails.label']}"   style="border: 1px solid #d9d9d9; width:95%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1"  
					 style=" width:100%" cellspacing="3">
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;" />
		<h:outputText value="Choose Project" />
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:selectOneMenu value="#{domesticProjectAssignmentFormBean.selectedProjectId}" style="width:160px;">
		<f:selectItem itemLabel="Select a Project " itemValue="" />
		<f:selectItems value="#{domesticProjectAssignmentFormBean.projectsMap}" />
	 	<p:ajax event="change" listener="#{domesticProjectAssignmentFormBean.projectChangeListener}" update="projectName,clientAddress,client,clientLocation,contactPerson,contactNumber,periodFrom,periodTo,recommendedBy"/>
		</p:selectOneMenu>
	    <h:inputHidden />
	    <h:outputLabel value="#{msg['recommendedby.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText id="recommendedBy" value="#{domesticProjectAssignmentFormBean.selectedProject.owner.firstName} #{domesticProjectAssignmentFormBean.selectedProject.owner.lastName}" readonly="true" />					
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['projectname.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText id="projectName" value="#{domesticProjectAssignmentFormBean.selectedProject.projectName}" readonly="true"/>
		<h:inputHidden  /> 					 	
		<h:outputLabel value="#{msg['clientaddress.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText id="clientAddress" value="#{domesticProjectAssignmentFormBean.selectedProject.clientAddress}" readonly="true" />
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientname.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText  id="client" value="#{domesticProjectAssignmentFormBean.selectedProject.client}" readonly="true"/>
		<h:inputHidden  />
		<h:outputLabel value="#{msg['clientlocation.label']}"/>
		<h:outputLabel value=" : " />
		<p:inputText  id="clientLocation" value="#{domesticProjectAssignmentFormBean.selectedProject.clientLocation}" readonly="true"/>
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputText id="contactPerson" value="#{domesticProjectAssignmentFormBean.selectedProject.contactPerson}" readonly="true" />
		<h:inputHidden  />
		<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
		<h:outputLabel value=" : " />
		<p:inputText id="contactNumber" value="#{domesticProjectAssignmentFormBean.selectedProject.contactNumber}"  readonly="true"/>
		
		<h:panelGroup>
		<p:spacer></p:spacer>
		<p:spacer></p:spacer>
		<h:outputLabel value="#{msg['projectstratdate.label']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" id="periodFrom" value="#{domesticProjectAssignmentFormBean.selectedProject.periodFrom}"/>
		<h:inputHidden  />
		<h:outputLabel value="#{msg['projectenddate.label']}"/>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" id="periodTo" value="#{domesticProjectAssignmentFormBean.selectedProject.periodTo}"/> 
		
		</h:panelGrid>
	 </p:panel>
	
		
		<p:panel header="#{msg['assignmentallowancedetails.label']}"   style="border: 1px solid #d9d9d9; width:95%"> 
		<h:panelGrid columns="7" columnClasses="employeeDetail6GridsCell1, gridCellMiddleLeftAligned, employeeDetail6GridsCell2, employeeDetail6GridsCell1"  
					 style=" width:100%" cellspacing="3" >
		<h:panelGroup>		 
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['dailyallowance.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask id="dailyAllowance" mask="99999.99" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.dailyAllowance}"  >
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		<p:watermark for="dailyAllowance" value="00000.00" />
		</p:inputMask> 
		<p:spacer></p:spacer>
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['advanceamount.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="advanceAmount" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.advanceAmount}">
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
	 	<p:watermark for="advanceAmount" value="00000.00" />
		<p:ajax event="change" listener="#{domesticProjectAssignmentFormBean.advanceAmountChangeListener}" update="totalAmount"/>
		</p:inputMask> 
		
	
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['advanceamountbydate.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.advanceByDate}" showButtonPanel="true" />
		<p:spacer></p:spacer>
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['paymentcycle.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:calendar pattern="dd/MM/yyy" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.paymentCycleDate}" showButtonPanel="true" />
		
	
		
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="Additionals"  />
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:selectOneMenu id="options" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.additionals}"  style="width:160px;">
		 			<f:selectItem itemLabel="Select Additional"/>
		         	<f:selectItem itemLabel="By ERPandERP" itemValue="By ERPandERP"/>  
					<f:selectItem itemLabel="By Client" itemValue="By Client" />    
         </p:selectOneMenu>
         <p:spacer></p:spacer>
	   	<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['roomrentadvance.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="roomRentAdvance" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.roomRentAdvance}"  >
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		<p:watermark for="roomRentAdvance" value="00000.00" />
		<p:ajax event="change" listener="#{domesticProjectAssignmentFormBean.roomRentAdvanceChangeListener}" update="totalAmount"/>
		</p:inputMask>
		
		
		
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/> 
		<h:outputLabel value="#{msg['roomrentpermonth.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="roomRentPerMonth" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.roomRentPerMonth}"  >
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		<p:watermark for="roomRentPerMonth" value="00000.00" />
		</p:inputMask>
		<p:spacer></p:spacer>
		<h:panelGroup>
		<h:outputLabel value="*" style="color : red;"/>
		<h:outputLabel value="#{msg['totalamount.lable']}"/>
		</h:panelGroup>
		<h:outputLabel value=" : " />
		<p:inputMask mask="99999.99" id="totalAmount" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.totalAdvance}" readonly="true">
		<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		<p:watermark for="totalAmount" value="00000.00" />
		</p:inputMask>
		
		</h:panelGrid>
	    </p:panel>
	    <h:panelGrid columns="1" style=" width:95%">
		<h:panelGroup style="float:right;">
		<p:commandButton  type="button" id="submit" value="Submit" onclick="confirmation.show()" ajax="false" />
        <p:commandButton type="reset" value="Reset" /> 
    	</h:panelGroup> 
    
	
	</h:panelGrid>
	
	<p:confirmDialog widgetVar="confirmation" id="confirmation" severity="alert" message="Do you want to submit your new domestic project assignment?">
			<h:panelGroup style="text-align: right; float: right;">
				<p:commandButton value="Yes, Submit Now" actionListener="#{domesticProjectAssignmentFormBean.saveDomesticProjectAssignmentAction}" process="@form" update="@form"  oncomplete="confirmation.hide()"/>
				<p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide()" type="button" />
			</h:panelGroup>
</p:confirmDialog>
</h:panelGrid>
 <!-- Domestic projects assignments list -->
        <h:panelGrid rendered="#{domesticProjectAssignmentFormBean.domesticProjectAssignmentsList}">
        
        <h:outputText value="#{msg['domesticprojectassignment.lable.heading']}" styleClass="outputTextTitle" style="font-weight: bold; color: #7892B7" />
			<p:spacer></p:spacer>
			
			<h:panelGrid style="width: 100%; text-align: left; ">
		    <p:scrollPanel style="width: 800px;height:300px"> 
		    	<p:dataTable id="domesticProjectAssignmentViewEditTable" style="width: 100%" value="#{domesticProjectAssignmentFormBean.projectAssignmentsList}" var="row" 
    					 	paginator="true" rows="10"  
               				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
               				rowsPerPageTemplate="5,10,15">
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['projectassignmentid.lable']}" />
						</f:facet>
							<h:outputText value="#{row.projectAssignmentCode}" /> 
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['projectname.label']}" />
						</f:facet>
						<h:outputText value="#{row.project.projectName}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['clientname.label']}" />
						</f:facet>
						<h:outputText value="#{row.project.client}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['clientlocation.label']}" />
						</f:facet>
						<h:outputText value="#{row.project.clientLocation}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['createdate.label']}" />
						</f:facet>
						<h:outputText  value="#{row.createDate}" >
						<f:convertDateTime pattern="dd/MM/yyy"/>
						</h:outputText>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['recommenderstatus.lable']}" />
						</f:facet>
						<h:outputText value="#{row.recommendationStatus}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="#{msg['approverstatus.lable']}" />
						</f:facet>
						<h:outputText value="#{row.approvalStatus}" />
					</p:column>
					<p:column style="width: 66px; text-align: center;">
						<f:facet name="header">
							<h:outputText value="View/Update" />
						</f:facet>
						
					<p:commandButton id="editview"  icon="ui-icon-search" action="#{domesticProjectAssignmentFormBean.viewProjectAssignmentInEditMode}" oncomplete="EditProjectAssignmentDialog.show()" update="@form" >
						<f:setPropertyActionListener target="#{domesticProjectAssignmentFormBean.projectAssignment}" value="#{row}"></f:setPropertyActionListener>
					</p:commandButton>
					</p:column>
					
			</p:dataTable>
			</p:scrollPanel>
			</h:panelGrid>
			
			<!-- VIEW/EDIT PROJECT ASSIGNMENT FORM -->
			
			<p:dialog header="View/Update Project Assignment" widgetVar="EditProjectAssignmentDialog" id="EditProjectAssignmentDialog" resizable="false">
			<p:scrollPanel style="height:300px; width:600px;" scrollMode="native">  
			<h:panelGrid  style="border: 1px solid #d9d9d9; width: 100%; padding-bottom: 20px;">
				
				<h:outputLabel value="#{msg['employeedetails.label']}" styleClass="outputTextSubTitle"  />
				<h:panelGrid columns="6" columnClasses="grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned,grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned" 
							 style="border: 1px solid #d9d9d9; width: 100%">  
				
					<h:outputLabel value="#{msg['projectassignmentid.lable']}"/>
					<h:outputLabel value=" : " />
					<p:inputText value="#{domesticProjectAssignmentFormBean.projectAssignment.projectAssignmentCode}" readonly="true"/> 
					<h:outputLabel value="#{msg['createdate.label']}" />
					<h:outputLabel value=" : " />
					<p:calendar value="#{domesticProjectAssignmentFormBean.projectAssignment.createDate}"  showButtonPanel="true"/>
						
					<h:outputLabel value="#{msg['employeename.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText  readonly="true" value="#{domesticProjectAssignmentFormBean.projectAssignment.employee.firstName} #{domesticProjectAssignmentFormBean.projectAssignment.employee.lastName}"/>
					<h:outputLabel value="#{msg['employeeid.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText value="#{domesticProjectAssignmentFormBean.projectAssignment.employee.employeeCode}" readonly="true"/> 
									
					<h:outputLabel value="#{msg['contactnumber.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText value="#{domesticProjectAssignmentFormBean.projectAssignment.contactNumber}"  />
					<h:outputLabel value="#{msg['emergenceycontactnum.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText value="#{domesticProjectAssignmentFormBean.projectAssignment.emergencycontactNumber}" />  
	                <h:outputLabel value="#{msg['approvedby.lable']}"/>
	                <h:outputLabel value=" : " />
					<p:inputText  value="#{domesticProjectAssignmentFormBean.projectAssignment.approvedBy}"  readonly="true"/>
						
	
				</h:panelGrid>
				
				<h:outputLabel value="#{msg['assignmentdetails.label']}" styleClass="outputTextSubTitle"  />
				<h:panelGrid columns="6" columnClasses="grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned,grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned" 
							 style="border: 1px solid #d9d9d9; width: 100%">
				
					<h:outputText value="Choose Your Project" />
					<h:outputLabel value=" : " /> 
					<p:selectOneMenu value="#{domesticProjectAssignmentFormBean.projectAssignment.project.projectId}" style="width:160px;">
					<f:selectItems value="#{domesticProjectAssignmentFormBean.projectsMap}" />
					<p:ajax event="change" listener="#{domesticProjectAssignmentFormBean.projectChangeListenerUpdate}" update="projectNameUpdate,clientAddressUpdate,clientUpdate,clientLocationUpdate,contactPersonUpdate,contactNumberUpdate,periodFromUpdate,periodToUpdate,recommendedByUpdate" />
					</p:selectOneMenu>
					<h:outputLabel value="#{msg['recommendedby.lable']}"/>
					<h:outputLabel value=" : " />
					<p:inputText id="recommendedByUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.owner.firstName} #{domesticProjectAssignmentFormBean.projectAssignment.project.owner.lastName}" readonly="true"/>  
					
					
					<h:outputLabel value="#{msg['projectname.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText id="projectNameUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.projectName}" readonly="true"/> 					 	
					<h:outputLabel value="#{msg['clientaddress.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText id="clientAddressUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.clientAddress}"  readonly="true"/>
					
					<h:outputLabel value="#{msg['clientname.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText  id="clientUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.client}" readonly="true"/>
					<h:outputLabel value="#{msg['clientlocation.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText  id="clientLocationUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.clientLocation}" readonly="true"/> 
					
										
					<h:outputLabel value="#{msg['clientcontactperson.label']}"/>
					<h:outputLabel value=" : " />
					<p:inputText id="contactPersonUpdate"  value="#{domesticProjectAssignmentFormBean.projectAssignment.project.contactPerson}"  readonly="true"/>
					<h:outputLabel value="#{msg['clientcontactnumber.lable']}"/>
					<h:outputLabel value=" : " />
					<p:inputText  id="contactNumberUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.contactNumber}" readonly="true"/>
					
					
					<h:outputLabel value="#{msg['projectstratdate.label']}"/>
					<h:outputLabel value=" : " />
					<p:calendar id="periodFromUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.periodFrom}"  showButtonPanel="true" disabled="true"/>
					<h:outputLabel value="#{msg['projectenddate.label']}"/>
					<h:outputLabel value=" : " />
					<p:calendar id="periodToUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignment.project.periodTo}"  showButtonPanel="true" disabled="true"/>
				</h:panelGrid>
				<h:outputLabel value="#{msg['assignmentallowancedetails.label']}" styleClass="outputTextSubTitle"  />
				<h:panelGrid columns="6" columnClasses="grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned,grid90pxCellMiddleLeftAligned,gridCellMiddleLeftAligned" 
							 style="border: 1px solid #d9d9d9; width: 100%">
					
					<h:outputLabel value="#{msg['dailyallowance.lable']}"/>
					<h:outputLabel value=" : " />					 
	                <p:inputMask id="dailyAllowanceUpdate" mask="99999.99" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.dailyAllowance}"  >
		                  <f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
		                  <p:watermark for="dailyAllowanceUpdate" value="00000.00" />
		            </p:inputMask>   
					<h:outputLabel value="#{msg['advanceamount.lable']}"/>
	       			<h:outputLabel value=" : " />
				   	<p:inputMask mask="99999.99" id="advanceAmountUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.advanceAmount}">
							<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
	 						<p:watermark for="advanceAmountUpdate" value="00000.00" />
							<p:ajax event="change" listener="#{domesticProjectAssignmentFormBean.advanceAmountChangeListenerUpdate}" update="totalAmountUpdate"/>
					</p:inputMask> 
					
					<h:outputLabel value="#{msg['advanceamountbydate.lable']}"/>
					<h:outputLabel value=" : " />
					<p:calendar value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.advanceByDate}" showButtonPanel="true" />
					
					<h:outputLabel value="#{msg['paymentcycle.lable']}"/>
					<h:outputLabel value=" : " />
					<p:calendar value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.paymentCycleDate}" showButtonPanel="true" />
	              
					<h:outputLabel value="Additionals"/>
					<h:outputLabel value=" : " />					
					<p:selectOneMenu id="optionsUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.additionals}"  style="width:160px;">
				 			<f:selectItem itemLabel="Select Additional"/>
				         	<f:selectItem itemLabel="By ERPandERP" itemValue="By ERPandERP"/>  
							<f:selectItem itemLabel="By Client" itemValue="By Client" />    
                    </p:selectOneMenu> 
					
					<h:outputLabel value="#{msg['roomrentadvance.lable']}"/>
					<h:outputLabel value=" : " />
					<p:inputMask mask="99999.99" id="roomRentAdvanceUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.roomRentAdvance}"  >
					<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
					<p:watermark for="roomRentAdvanceUpdate" value="00000.00" />
					<p:ajax event="change" listener="#{domesticProjectAssignmentFormBean.roomRentAdvanceChangeListenerUpdate}" update="totalAmountUpdate"/>
					</p:inputMask>
					
					<h:outputLabel value="#{msg['roomrentpermonth.lable']}"/>
					<h:outputLabel value=" : " />
					<p:inputMask mask="99999.99" id="roomRentPerMonthUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.roomRentPerMonth}"  >
					<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
					<p:watermark for="roomRentPerMonthUpdate" value="00000.00" />
					</p:inputMask>
					<h:outputLabel value="#{msg['totalamount.lable']}"/>
					<h:outputLabel value=" : " />
					 <p:inputMask mask="99999.99" id="totalAmountUpdate" value="#{domesticProjectAssignmentFormBean.projectAssignmentDetail.totalAdvance}" >
							<f:convertNumber minIntegerDigits="5" minFractionDigits="2" />
							<p:watermark for="totalAmountUpdate" value="00000.00" />
					</p:inputMask>
					
				</h:panelGrid>
				
				
			</h:panelGrid>
			
			</p:scrollPanel>
			 <h:panelGrid columns="1" style=" width:95%">
				<h:panelGroup style="float:right;">
							<p:commandButton id="updateButton" rendered="#{domesticProjectAssignmentFormBean.renderUpdate}" update="growl" value="Update" action="#{domesticProjectAssignmentFormBean.updateDomesticProjectAssignment}" />
				        	<p:commandButton id="updateDisableButton" rendered="#{domesticProjectAssignmentFormBean.renderDisableUpdate}" update="growl" value="Update" action="#{domesticProjectAssignmentFormBean.updateDomesticProjectAssignment}" disabled="true" />
				        	<p:commandButton id="closeButton" process="@this" value="Close" actionListener="#{domesticProjectAssignmentFormBean.dialogClose}" ajax="false"/>
			   	</h:panelGroup> 
			  </h:panelGrid>
			</p:dialog>	
		 
        </h:panelGrid>
      </h:form>
		
	</ui:define>
</ui:composition>

